* {
    padding: 0;
    margin: 0;
    transition-timing-function: cubic-bezier(.19, 1, .22, 1);
}

html {
    font-size: 16px;
}

body {
    font-family: Helvetica, Tahoma, Arial, "Microsoft YaHei", "微软雅黑", SimSun, "宋体", Heiti, "黑体", sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #fff;
    line-height: 2;
    padding: 0 5%;
    background-color: #212121;
    font-size: 1rem;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* 星空背景样式 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
}

#startrack {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    opacity: .5;
    object-fit: cover;
}

.background .cover {
    position: absolute;
    bottom: 0%;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(to top, rgba(32, 32, 32, 1) 0%, rgba(32, 32, 32, 0) 50%);
}

/* 响应式根字体大小 */
@media screen and (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    html {
        font-size: 12px;
    }
}

/* 搜索按钮样式 */
.search-button {
    transition: all 0.3s ease;
}

/* 确保搜索图标在所有设备上都能正确显示 */
.search-button {
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    vertical-align: middle;
    line-height: 1;
    /* 图标向左移动15px */
    margin-left: -15px;
}

/* 确保按钮容器也正确对齐 */
.input-group-append {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 响应式调整搜索按钮 */
@media screen and (max-width: 768px) {
    .search-button {
        width: 44px;
        height: 44px;
        font-size: 18px;
        margin-left: -15px;
    }
}

@media screen and (max-width: 480px) {
    .search-button {
        width: 40px;
        height: 40px;
        font-size: 16px;
        margin-left: -15px;
    }
    
    /* 确保搜索框和按钮在移动设备上正确对齐 */
    .input-group {
        width: 100% !important;
        box-sizing: border-box;
    }
    
    /* 确保搜索框在移动设备上有合适的宽度 */
    .search-input {
        flex: 1;
        min-width: 0;
    }
}

::selection {
    background: rgba(255, 255, 255, .08);
}

.intro {
    position: relative;
}

.clear:after {
    content: "";
    display: block;
    height: 0;
    visibility: hidden;
    clear: both;
}

.chatbox>.line {
    display: none;
}


.ch {
    width: 100%;
    padding-bottom: 60px;
    animation: fadedown 1s cubic-bezier(.19, 1, .22, 1);
    -webkit-animation: fadedown 1s cubic-bezier(.19, 1, .22, 1);
    -ms-animation: fadedown 1s cubic-bezier(.19, 1, .22, 1);
    -moz-animation: fadedown 1s cubic-bezier(.19, 1, .22, 1);
}

.ch h2.chtitle {
    padding-bottom: 2rem;
    font-size: 1.6rem;
    letter-spacing: .2em;
    color: rgba(255, 255, 255, .5);
}

/* 响应式章节标题大小 */
@media screen and (max-width: 768px) {
    .ch h2.chtitle {
        font-size: 1.4rem;
        padding-bottom: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .ch h2.chtitle {
        font-size: 1.2rem;
        padding-bottom: 1.2rem;
        letter-spacing: .1em;
    }
}

.ch h2.chtitle span {
    color: #fff;
}

.ch h2.chtitle:after {
    content: '';
    display: block;
    width: 10%;
    height: 5px;
    background-color: rgba(255, 255, 255, .5);
    margin-top: 30px;
}

@keyframes fadedown {
    0% {
        opacity: 0;
        transform: translateY(-50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@-webkit-keyframes fadedown {
    0% {
        opacity: 0;
        transform: translateY(-50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@-ms-keyframes fadedown {
    0% {
        opacity: 0;
        transform: translateY(-50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@-moz-keyframes fadedown {
    0% {
        opacity: 0;
        transform: translateY(-50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    position: relative;
    margin: 0 auto;
    height: 100%;
    max-width: 1800px;
}

.intro {
    color: #fff;
}

.intro .container {
    animation: fadedown 3.5s cubic-bezier(.19, 1, .22, 1);
    -webkit-animation: fadedown 3.5s cubic-bezier(.19, 1, .22, 1);
    -ms-animation: fadedown 3.5s cubic-bezier(.19, 1, .22, 1);
    -moz-animation: fadedown 3.5s cubic-bezier(.19, 1, .22, 1);
    padding: 20px;
}

.hello {
    padding: 5% 0;
}

.hello h1 {
    font-size: 4.5rem;
    letter-spacing: .2em;
    font-weight: 1000;
    line-height: 1.35em;
}

/* 响应式标题大小 */
@media screen and (max-width: 1200px) {
    .hello h1 {
        font-size: 3.5rem;
    }
}

@media screen and (max-width: 768px) {
    .hello h1 {
        font-size: 2.5rem;
    }
}

@media screen and (max-width: 480px) {
    .hello h1 {
        font-size: 2rem;
        letter-spacing: .1em;
    }
}

.hello .avatar {
    height: 9rem;
    width: 9rem;
    max-height: 150px;
    max-width: 150px;
    border-radius: 100%;
    float: left;
    margin-right: 3rem;
}

/* 响应式头像大小 */
@media screen and (max-width: 768px) {
    .hello .avatar {
        height: 7rem;
        width: 7rem;
        margin-right: 2rem;
    }
}

@media screen and (max-width: 480px) {
    .hello .avatar {
        height: 6rem;
        width: 6rem;
        margin-right: 1.5rem;
    }
}

.readme {
    font-size: 1.1rem;
    letter-spacing: .15em;
}

/* 响应式正文大小 */
@media screen and (max-width: 768px) {
    .readme {
        font-size: 1rem;
        letter-spacing: .1em;
    }
}

.readme sup {
    font-size: .76em;
}

.readme p {
    margin-bottom: 1.8em;
}

.readme a {
    position: relative;
    color: #fff;
    margin: 0 5px;
    text-decoration: none;
    transition: .3s all;
}

.readme a::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 95%;
    height: 3px;
    background-color: rgba(255, 255, 255, .6);
    transition: .1s all;
}

.readme a:hover::after {
    background-color: rgba(255, 255, 255, 1);
    height: 5px;
}

.readme .b {
    font-weight: bold;
}

ul.skill li .progress div {
    animation: progressin 7s;
    -webkit-animation: progressin 7s;
    -ms-animation: progressin 7s;
    -moz-animation: progressin 7s;
}

@keyframes progressin {
    from {
        width: 0;
    }
}

@-webkit-keyframes progressin {
    from {
        width: 0;
    }
}

@-ms-keyframes progressin {
    from {
        width: 0;
    }
}

@-moz-keyframes progressin {
    from {
        width: 0;
    }
}

.links a {
    color: #fff;
    text-decoration: none;
}

.gate-friends {
    display: none;
}

#friends-container,
#projects-container {
    display: none;
}

.gate .container {
    background-color: transparent;
    border-radius: 10px;
}

.ch-content {
    padding: 0 2%;
}

.gate .links .item {
    position: relative;
    float: left;
    margin: 0.2% 0.2%;
    width: calc(100% - 0.4%); /* 默认单列显示 */
    height: 3.5rem;
    max-height: 60px;
    padding: 10px 0.5%;
    color: #fff;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: .2s all;
    opacity: 1;
    overflow: hidden;
}

/* 小型屏幕 - 每行显示2个 */
@media screen and (min-width: 500px) {
    .gate .links .item {
        width: calc(50% - 0.4%);
    }
}

/* 中等屏幕 - 每行显示2个 */
@media screen and (min-width: 600px) {
    .gate .links .item {
        width: calc(50% - 0.4%);
    }
}

/* 大屏幕 - 每行显示3个 */
@media screen and (min-width: 800px) {
    .gate .links .item {
        width: calc(33.33% - 0.4%);
    }
}

/* 大屏幕+ - 每行显示4个 */
@media screen and (min-width: 1000px) {
    .gate .links .item {
        width: calc(25% - 0.4%);
    }
}

/* 超大屏幕 - 每行显示4个 */
@media screen and (min-width: 1200px) {
    .gate .links .item {
        width: calc(25% - 0.4%);
    }
}

/* 超超大屏幕 - 每行显示5个 */
@media screen and (min-width: 1400px) {
    .gate .links .item {
        width: calc(20% - 0.4%);
    }
}

/* 超宽屏幕 - 每行显示6个 */
@media screen and (min-width: 1800px) {
    .gate .links .item {
        width: calc(16.67% - 0.4%);
    }
}

.gate .links .item::before {
    content: '';
    position: absolute;
    top: -75px;
    right: -75px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 70%);
    opacity: 0.3;
    z-index: 0;
}

.gate .links .item.akarin {
    opacity: .58;
}

.gate .links .item:hover {
    opacity: 1;
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.gate .links .item .avatar {
    float: left;
    height: 2.5rem;
    line-height: 2.5rem;
    width: 2.5rem;
    max-height: 40px;
    max-width: 40px;
    border-radius: 100%;
    text-align: center;
    margin-right: 0.8rem;
    background-color: #353535;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.gate .links .item .avatar i {
    font-size: 1.1rem;
}

.gate .links .item .avatar img {
    height: 100%;
    max-width: 100%;
    border-radius: 100%;
}

.gate .links .item .inner {
    float: left;
    width: calc(100% - 55px);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.gate .links .item .inner h5 {
    font-weight: normal;
    font-size: 0.9rem;
    margin: 0 0 0.2rem 0;
    letter-spacing: 0.05em;
}

.gate .links .item .inner p {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, .6);
    line-height: 1.3;
    margin: 0;
}

.gate .links .item .inner h5,
.gate .links .item .inner p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer {
    letter-spacing: .3em;
    background-color: transparent;
    padding: 20px;
    margin-top: 20px;
}

.footer a {
    color: inherit;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer h3 {
    font-weight: normal;
    font-size: 1.3rem;
    margin: 0.4rem 0;
}

.footer p {
    font-size: 0.8rem;
    opacity: .3;
}

/* 响应式页脚大小 */
@media screen and (max-width: 480px) {
    .footer h3 {
        font-size: 1.1rem;
    }
    
    .footer p {
        font-size: 0.7rem;
    }
}

.footer p.c {
    margin-top: 20px;
    letter-spacing: .1em;
}

.find-me a {
    text-decoration: none;
    color: #fff;
}

.find-me .item {
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    position: relative;
    text-align: center;
    transition: .2s all;
    position: relative;
    margin: 10px 20px 10px 0;
    background-color: transparent; /* 默认状态完全透明 */
    border-radius: 12px;
    /* 移除边框 */
}

.find-me .item i {
    position: relative;
    display: inline-block;
    font-size: 26px;
    z-index: 2;
    transition: .3s all;
}

.find-me .item span {
    font-size: 12px;
    display: block;
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 80px;
    height: auto;
    line-height: 1;
    z-index: 2;
    opacity: 0;
    transition: .3s all;
}

.find-me .item:hover span {
    opacity: .6;
    bottom: 16px;
}

.find-me .item:hover i {
    transform: translateY(-10px);
}

.find-me .item::after {
    content: '';
    display: none; /* 完全移除颜色条 */
}

/* 已移除所有特定子元素的颜色条样式 */

.find-me .item:hover {
    transform: translateY(-3px);
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* 移除边框颜色 */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 已移除悬停状态下的颜色条样式 */

.roll-tag {
    display: none;
    transition: .1s all;
    width: 100%;
    position: relative;
    height: 80px;
    margin-bottom: 10px;
}

.roll-tag.active {
    display: inline-block;
}

.roll-tag span {
    position: absolute;
    animation: tag-entering 0.1s ease-in-out;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 10px 20px;
    display: inline-block;
    white-space: nowrap;
    transform-origin: center left;
}

.roll-tag span::before {
    content: '#';
    margin-right: 5px;
    display: inline;
}

.roll-tag span.removing {
    animation: tag-removing 0.1s ease-in-out;
}

.enter-list {
    margin-left: -2%;
    margin-right: -2%;
}

.enter-list .item {
    position: relative;
    float: left;
    margin: 0 2%;
    width: 29.33%;
    display: block;
    color: #fff;
    text-decoration: none;
    height: 160px;
    background-color: transparent;
    border-radius: 10px;
    transition: .2s all;
}

.enter-list .item:hover {
    background-color: rgba(255, 255, 255, .1);
    transform: translateY(-5px);
    animation: index-link-active 1s cubic-bezier(0.315, 0.605, 0.375, 0.925) forwards;
}

.enter-list .item .text {
    position: absolute;
    bottom: 10%;
    left: 8%;
}

.enter-list .item .bg {
    position: absolute;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.enter-list .item .bg div {
    height: 100%;
    width: 100%;
}

.enter-list .item .bg svg {
    position: absolute;
    right: -20px;
    top: -20px;
    height: 160px;
    width: 160px;
    opacity: .05;
}

.enter-list .item .bg .triangle svg {
    height: 180px;
    width: 180px;
}

.enter-list .item .bg .square svg {
    animation: spin-icon 15s linear infinite;
}

.enter-list .item .bg .triangle svg {
    animation: spin-icon 30s linear infinite;
}

.enter-list .item .bg .rounded svg {
    animation: spin-icon 20s linear infinite;
}

@keyframes spin-icon {
    0% {
        transform: rotate(0);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes tag-entering {
    0% {
        transform: translateY(-10px);
        opacity: 0;
    }
    100% {
        opacity: 1;
        transform: translateY(0px);
    }
}

@keyframes tag-removing {
    0% {
        transform: translateY(0px);
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

@keyframes loading-point {
    0% {
        opacity: .8;
    }
    50% {
        opacity: .25;
    }
    100% {
        opacity: 8;
    }
}

@keyframes error {
    0% { transform: translateX(0) }
    25% { transform: translateX(-2px) }
    50% { transform: translateX(0) }
    75% { transform: translateX(2px) }
    100% { transform: translateX(0) }
}

/* 搜索容器样式 - 完全统一的外观 */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 280px;
    margin: 15px 0;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    overflow: hidden;
    padding: 0;
}

/* 搜索引擎选择器样式 - 与搜索框完全融合 */
.search-engine-selector {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    height: 32px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 1001;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
    border-radius: 0 !important;
}

.search-engine-selector:hover {
    background-color: transparent !important;
}

/* 当前搜索引擎图标样式 */
.current-search-engine-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    min-height: 20px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

/* 确保图片也没有额外样式 */
.current-search-engine-icon img {
    width: 18px !important;
    height: 18px !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

/* 搜索输入框样式 - 与搜索框完全融合（占据所有剩余空间） */
.search-container input {
    flex: 1;
    height: 32px;
    padding: 0 15px;
    background: transparent !important;
    border: none !important;
    color: white;
    font-size: 12px;
    outline: none !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
}

.search-container input:focus {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.search-container input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* 搜索按钮样式 - 确保可见 */
.search-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 8px !important;
    background-color: transparent !important; /* 透明背景 */
    border: none !important; /* 移除边框 */
    color: white !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    opacity: 1 !important;
    z-index: 9999 !important;
    position: relative !important;
    border-radius: 0 !important;
    visibility: visible !important;
    min-width: 32px !important;
    min-height: 32px !important;
    overflow: visible !important;
}

.search-button:hover {
    background-color: transparent !important; /* 移除悬停时的颜色加深 */
    border: none !important;
}

.search-button:active {
    background-color: transparent !important; /* 移除点击时的颜色加深 */
    transform: none !important;
    border: none !important;
}

.search-button i {
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.search-button:hover i {
    opacity: 1;
}

/* 确保所有元素之间无缝连接 */
.search-engine-selector, 
.search-container input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-container {
        max-width: 90%;
    }
    
    .search-container input {
        font-size: 14px;
    }
}

@keyframes index-link-active {
    0% {
        transform: perspective(1600px) rotateX(0) rotateY(0) translateZ(0);
    }
    16% {
        transform: perspective(1600px) rotateX(10deg) rotateY(5deg) translateZ(32px);
    }
    100% {
        transform: perspective(1600px) rotateX(0) rotateY(0) translateZ(65px);
    }
}

.gate .links .item {
    width: 23%; /* 默认为更宽的显示比例，减少换行 */
}

@media screen and (min-width: 1400px) {
    .container {
        width: 90%; /* 增加容器宽度 */
    }
    .gate .links .item {
        width: 18%; /* 增加一行可显示的卡片数量 */
    }
}

@media screen and (max-width: 700px) {
    body,
    html {
        min-width: 0;
        font-size: 15px;
    }
    .container {
        width: auto;
        margin: 0;
    }
    div.el span {
        display: block;
        width: 60%;
        left: 0;
        top: 75px;
        margin-left: 0;
        margin: 0 auto;
        margin-top: -40%;
    }
    .ch {
        padding: 20px 0;
    }
    .hello h1 {
        font-size: 40px;
    }
    .readme {
        font-size: 15px;
    }
    .roll-tag {
        height: 60px;
    }
    .roll-tag span {
        white-space: normal;
        display: block;
    }
    .enter-list .item {
        float: none;
        width: auto;
        margin-bottom: 20px;
        height: 100px;
    }
    .gate .links .item {
        width: 100%;
        margin: 0;
        padding: 15px 2%;
        height: auto;
    }
    .gate .links .item .avatar {
        height: 40px;
        line-height: 40px;
        width: 40px;
        margin-right: 10px;
    }
    .gate .links .item .avatar img {
        height: 40px;
        max-width: 40px;
    }
    .gate .links .item .inner {
        line-height: 1.5;
        padding: 0;
    }
    .gate .links .item .inner h5 {
        font-size: 15px;
    }
    .footer {
        padding-bottom: 100px;
    }
    .footer h3 {
        letter-spacing: .1em;
    }
    .footer p {
        letter-spacing: .2em;
    }
}